from django.urls import re_path
from rest_framework.routers import DefaultRouter

from appname.views import AppclassModelViewSet

router = DefaultRouter()
router.register(r'appname', AppclassModelViewSet)

urlpatterns = [
    # 导出
    re_path('appname/export/', AppclassModelViewSet.as_view({'get': 'export', })),
    # 导入模板下载及导入
    re_path('appname/importTemplate/',
            AppclassModelViewSet.as_view({'get': 'importTemplate', 'post': 'importTemplate'})),    
]

urlpatterns += router.urls
